<?php

namespace Part12_AppearanceRule\Code2;

class Fund
{
    private $gu1;
    private $gu2;
    private $gu3;
    private $nd1;
    private $rt1;

    public function __construct()
    {
        $this->gu1 = new Stock1();
        $this->gu2 = new Stock2();
        $this->gu3 = new Stock3();
        $this->nd1 = new NationalDebt1();
        $this->rt1 = new Realty1();
    }

    public function buyFund()
    {
        $this->gu1->buy();
        $this->gu2->buy();
        $this->gu3->buy();
        $this->nd1->buy();
        $this->rt1->buy();
    }

    public function sellFund()
    {
        $this->gu1->sell();
        $this->gu2->sell();
        $this->gu3->sell();
        $this->nd1->sell();
        $this->rt1->sell();
    }
}